﻿@{
    ViewBag.Title = "Home";
    Layout = "~/Views/Shared/_LayoutFull.cshtml";

    string ErrorMessage = TempData["ErrorMessage"] as string;
}

<div class="row main">
    <div class="col-md-4 col-md-offset-4">
        <div class="login-panel panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title">Error</h3>
            </div>
            <div class="panel-body">
                @if (ErrorMessage != null && ErrorMessage != string.Empty)
                {
                    <span>@ErrorMessage</span>
                }
                else
                {
                    <span>An Unknown error occurred in the application! Please notify the system admistrator.</span>
                }
            </div>
            <div class="panel-footer">
                <a href="#" id="back-button">Back</a>

            </div>
        </div>
    </div>
</div>

@section Scripts {

                <script type="text/javascript">
                    $(document).ready(function () {
                        $("#back-button").click(function (e) {
                            e.preventDefault();
                            window.history.back();
                        });
                    });
                </script>
}
